var decrypt_url = '/service/infohandler/decrypt';
var encrypt_url = '/service/infohandler/encrypt';

var app = new Vue({
	el: '#app',
	data:{
	 message: 'Hello Vue!',
	 originData:'',
	 resultData:''
	},
	methods:{
		encrypt:function(){
			var that = this
			var param = {
				text: this.originData
			}
			axios({
				method: 'get',
				url:encrypt_url+'?text='+this.originData,
				data: JSON.stringify(param)
				//headers: {'Content-Type': 'application/json;charset=UTF-8'}
			}).then(function (res) {
				that.resultData = res.data
			}).catch (function () {
			});
		},
		decrypt:function(){
			var that = this
			var param = {
				text: this.originData
			}
			axios({
				method: 'get',
				url:decrypt_url+'?text='+this.originData,
				data: JSON.stringify(param)
				//headers: {'Content-Type': 'application/json;charset=UTF-8'}
			}).then(function (res) {
				that.resultData = res.data
			}).catch (function () {
			});
		}
	}
})